<template>
  <div class="history-detail" :style="imgStyle">
    <iframe :src="pdfurl" frameborder="0" style="width:100%;height: 100%"></iframe>
  </div>
</template>

<script>
  export default {
    name: "FilePreviewPdf",
    props: {
      pdfurl: {
        type: String,
        default: ''
      },
      //显示宽度
      showWidth: {
        type: Number,
        default: 0
      },
      //显示高度
      showHeight: {
        type: Number,
        default: 0
      },
    },
    data() {
      return {
        offsetw: 500, //宽度
        offseth: 500, //宽度
      }
    },
    computed: {
      // 图片样式
      imgStyle() {
        return {
          width: this.showWidth ? (this.showWidth + 'px') : '100%',
          height: this.showHeight ? (this.showHeight + 'px') : '75vh'
        };
      },
    },
    created() {},
    methods: {}
  };
</script>

<style lang="scss" scoped>

</style>